<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xmlns="http://maven.apache.org/POM/4.0.0"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
         xml:space="preserve">

    <modelVersion>4.0.0</modelVersion>
    <groupId>no.priv.bang.db.liquibase</groupId>
    <artifactId>run-liquibase</artifactId>
    <version>1.0.0-SNAPSHOT</version>
    <packaging>pom</packaging>
    <name>Run liquibase changelists</name>
    <description>Use maven to create databases from liquibase changelists</description>

    <properties>
        <liquibase.version>4.26.0</liquibase.version>
        <postgresql.version>42.7.2</postgresql.version>
        <karaf.db.password>karaf</karaf.db.password>
    </properties>

    <build>
        <plugins>
            <plugin>
                <groupId>org.liquibase</groupId>
                <artifactId>liquibase-maven-plugin</artifactId>
                <version>${liquibase.version}</version>
                <configuration>
                    <changeLogFile>src/main/resources/db-changelog.xml</changeLogFile>
                    <url>jdbc:postgresql://localhost/handlereg</url>
                    <username>karaf</username>
                    <password>${karaf.db.password}</password>
                    <promptOnNonLocalDatabase>false</promptOnNonLocalDatabase>
                </configuration>
                <executions>
                    <execution>
                        <phase>process-resources</phase>
                        <goals>
                            <goal>update</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <dependencies>
        <dependency>
            <groupId>org.postgresql</groupId>
            <artifactId>postgresql</artifactId>
            <version>${postgresql.version}</version>
            <scope>provided</scope>
        </dependency>
    </dependencies>

</project>
